package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.demo.handler.ListTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

/**
 * @Author: lu
 * @Date: 2024-11-20-16:59
 * @Description:
 */
@Data
@ApiModel("实体类AIAlarmMessage")
@TableName(value = "ems_ai_alarm_message", schema = "conch", autoResultMap = true)
public class AIAlarmMessage {
    @ApiModelProperty(value = "ID")
    @TableId(type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "告警标题")
    @TableField("msg_title")
    private String msgTitle;
    @ApiModelProperty(value = "告警类型")
    @TableField("type")
    private String type;
    @ApiModelProperty(value = "告警内容")
    @TableField("msg_content")
    private String msgContent;
    @ApiModelProperty(value = "创建时间")
    @TableField("alarm_time")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alarmTime;

    @ApiModelProperty(value = "告警图片")
    @TableField(value = "alarm_picture", typeHandler = ListTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<String> alarmPicture;

}
